<ui:composition 
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface>
        <composite:attribute name="label"/>
        <composite:attribute name="value" default="&#160;"/>
        <composite:attribute name="pattern"/>
    </composite:interface>

    <composite:implementation>
        <c:set var="pattern" value="#{cc.attrs.pattern}"/>
        <c:if test="#{empty cc.attrs.pattern}">
            <c:set var="pattern" value="#{deltasetConfig['dateFormat']}"/>
        </c:if>
        <c:if test="#{empty pattern}">
            <c:set var="pattern" value="dd-MM-yyyy"/>
        </c:if>
        <h:outputLabel for="outputDate" value="#{cc.attrs.label}:" rendered="#{not empty cc.attrs.label}" styleClass="ds-label"/>
        <h:outputText id="outputDate" value="#{cc.attrs.value}" title="#{cc.attrs.label}">
            <c:if test="#{not empty cc.attrs.label}">
                <f:attribute name="styleClass" value="ds-field"/>
            </c:if>
            <f:convertDateTime pattern="#{pattern}"/>
        </h:outputText>
    </composite:implementation>
</ui:composition>